﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.DataLayer;

namespace Common.Tools
{
    public class Prava
    {
        public static bool Proveri(int modul)
        {
            bool result = false;

            using (CommonDataContext dc = new CommonDataContext())
            {
                if ((from t in dc.KorisnikModuls
                     where t.KorisnikId == Common.Properties.Settings.Default.KorisnikId
                     && t.ModulId == modul
                     select t).Any()) result = true;
            }

            return result;
        }
    }
}
